<div class="form">
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'member-form',
	'enableAjaxValidation'=>false,
	'htmlOptions' => array('enctype' => 'multipart/form-data')
)); ?>
<?php echo $form->errorSummary(array($member, $membercode, $education)); ?>
	<table class="button-form"><tr>
		<td><span class="note">Thông tin bắt buộc <span class="required">*</span>.</span></td>
		<td align="right">
			<?php if ($member->isNewRecord) :?><?php echo CHtml::submitButton('Nâng cao',  array('name' => 'Advance', 'class' => 'button')); ?><?php endif;?>
		</td>
		<td align="right" width="85">
			<div class="row buttons"><?php echo CHtml::submitButton($member->isNewRecord ? 'Đăng kí' : 'Cập nhật'); ?></div>
		</td>
	</tr></table>

	<div class="row">
		<?php echo $form->labelEx($membercode,'courses_id'); ?>
		<?php echo $form->dropDownList($membercode,'courses_id', CHtml::listData(Courses::model()->findAll(array("condition" => "status = '1'")), 'id', 'name')); ?>
		<?php echo $form->error($membercode,'courses_id'); ?>
	</div>
	<div class="row">
		<?php echo $form->labelEx($membercode,'status'); ?>
		<?php echo $form->dropDownList($membercode,'status',Util::itemAlias('CheckType')); ?>
		<?php echo $form->error($membercode,'status'); ?>
	</div>

    <div class="row">
		<?php echo $form->labelEx($member,'fullname'); ?>
			<?php echo $form->textField($member,'fullname',array('size'=>60,'maxlength'=>128)); ?>
		<?php echo $form->error($member,'fullname'); ?>
	</div>
	<div class="row">
		<?php echo $form->labelEx($member,'cmnd'); ?>
			<?php echo $form->textField($member,'cmnd',array('size'=>60,'maxlength'=>12)); ?>
		<?php echo $form->error($member,'cmnd'); ?>
	</div>
	<div class="row">
		<?php echo $form->labelEx($member,'sex'); ?>
			<?php echo $form->dropDownList($member,'sex', Util::itemAlias('Sex')); ?>
		<?php echo $form->error($member,'sex'); ?>
	</div>


    <div class="row">
		<?php echo $form->labelEx($member,'email'); ?>
			<?php echo $form->textField($member,'email',array('size'=>60,'maxlength'=>128)); ?>
		<?php echo $form->error($member,'email'); ?>
	</div>

	<?php if (!$member->isNewRecord): ?>
        <input type="hidden" name="update_id" value="<?php echo $member->user_id; ?>"/>
	<?php endif; ?>

	<table class="button-form"><tr>
		<td align="right">
			<div class="row buttons"><?php echo CHtml::submitButton($member->isNewRecord ? 'Đăng kí' : 'Cập nhật'); ?></div>
		</td>
	</tr></table>

<?php $this->endWidget(); ?>

</div><!-- form -->